user.spec.js ➔ ... ➔ ???   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 35

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 1
dl 0
loc 35
rs 8.8571
nop 0
1
'use strict'
2
3
import { User } from './user'
4
import { expect } from 'chai'
5
import { describe, it } from 'mocha'
6
7
describe('User: models', () => {
8
  describe('.paths', () => {
9
    it('should have the fields', () => {
10
      expect(User.schema.paths).to.have.all.keys(
11
        '__v',
12
        '_id',
13
        'account.language',
14
        'confirmationSentAt',
15
        'confirmationToken',
16
        'confirmationTokenExpiryAt',
17
        'confirmedAt',
18
        'createdAt',
19
        'currentSignInAt',
20
        'currentSignInIpAddress',
21
        'email',
22
        'failedAttempts',
23
        'hash',
24
        'lastSignInAt',
25
        'lastSignInIpAddress',
26
        'lockedAt',
27
        'recoveredAt',
28
        'recoverySentAt',
29
        'recoveryToken',
30
        'recoveryTokenExpiryAt',
31
        'registeredAt',
32
        'salt',
33
        'signInCount',
34
        'unlockToken',
35
        'unlockTokenExpiryAt',
36
        'unlockTokenSentAt',
37
        'unlockedAt',
38
        'unregisteredAt',
39
        'updatedAt'
40
      )
41
    })
42
  })
43
})
44